package com.example.protestgps;

public class Members implements Comparable<Members> {
		int _MemberID;
		double _Lat,_Lng;
		String _mobileno;
		double _distToCurr;
		
		// Set Value
		public void sMemberID(int vMemberID){
	        this._MemberID = vMemberID;
	    }
		public void sLat(Double vLat){
	        this._Lat = vLat;
	    }
		public void sLng(Double vLng){
	        this._Lng = vLng;
	    }	
		public void sMobileno(String vmobile){
	        this._mobileno = vmobile;
	    }	
		
		// Get Value
		public double gMemberID(){
	        return _MemberID;
	    }
		public double gLat(){
			 return _Lat;
	    }
		public double gLng(){
			 return _Lng;
	    }
		public String gmobileno(){
	        return _mobileno;
	    }	
		
		public void setCurpoint(double lat,double lng){
			_distToCurr = Math.sqrt(Math.pow((_Lat-lat),2)+Math.pow(_Lng-lng,2));
		
			
		}
		
		public double getdistToCur(){
			return _distToCurr;
			
		}
		@Override
		public int compareTo(Members another) {
			// TODO Auto-generated method stub
			System.out.println(this._distToCurr+" vs "+another._distToCurr);
			return (int)(this._distToCurr*1000000-another._distToCurr*1000000);
		}
	}

	

